<template>
    <div class="container">
        <navigationBar title=" "></navigationBar>
        <div class="reset" :style="'padding-top: ' + navigationBarHeight + 'px;'">
			<div class="title">短信登录</div>
            <div class="main-1">
                <div class="warp">
                    <div class="input"><input type="number"  placeholder="请输入手机号码" v-model="formData.mobile"/></div>
                </div>
                <div class="warp" style="margin-bottom: 0;">
                    <div class="input">
                        <input type="number" placeholder="请输入验证码"  v-model="formData.code"/>
                        <div class="get-code" v-if="num == 60" @click="getCode">{{getTxt}}
                        </div>
                        <div class="get-code" v-if="num !== 60">{{ num }}</div>
                    </div>
                </div>
            </div>
			<div class="submit-btn" v-if="!formData.mobile  || !formData.code ">登录</div>
			<div class="active" @click="submitForm" v-if="formData.mobile && formData.code">登录</div>
			<div class="bottom">
				<span @click="toOtherLogin">短信登录</span>
				<span @click="toReset">忘记密码</span>
			</div>
        </div>
		
    </div>
</template>

<script>
    import data from '@/js/publics/otherLogin/data.js';
    import methods from '@/js/publics/otherLogin/methods.js';
    import {mapState} from 'vuex';
    import navigationBar from '../../components/navigationBar.vue';
    import btn1 from '@/components/btn1.vue'

    export default {
        data,
        methods,
        onLoad() {
			// uni.getProvider({
			// 	service: 'oauth',
			// 	success: res => {
			// 		console.log('oauth: ', JSON.stringify(res))
			// 		if (res.provider) {
			// 			let provider = res.provider
			// 			this.provider = provider
			// 		}
			// 	}
			// })
					
        },
        onShow() {
			this.loading = false
			
            
        },
        onHide() {
            console.log('on hide')
        },
        onUnload() {
 
        },
        computed: {
            ...mapState([
                'navigationBarHeight'
            ])
        },
        components: {
            navigationBar,
            btn1
        }
    };
</script>

<style scoped lang="scss">
    @import '~@/style/publics/otherLogin.scss';

    .on {
        color: #999999 !important;
    }
</style>
